package components.banners
{
	import SEApp.se_util;
	
	import UIFree.uif_component;
	import UIFree.uif_ecomponent;
	import UIFree.uif_loader;

	public class clt_photocache extends uif_ecomponent {
		private var _mask: uif_ecomponent;
		private static const _genders: Array = ['f', 'm'];
		
		public function clt_photocache(parent:uif_component, ax:int=0, ay:int=0, a_width:int=0, a_height:int=0, ref_id: String = '468282879') {
			super(parent, ax, ay, 600, 130);
//			new uif_loader(this, 'images/banner1.jpg');
			var user: Object = (app as Object).user;
			var params: String = '?ref_id=' + ref_id + '&first_name=' + (user.first_name?user.first_name:user.nick) + 
									'&sex=' + (2 - user.sex).toString() + '&gender=' + _genders[user.sex] + 
									'&bdate=' + user.birthday + '&photo_url=' + user.pic + '&source=633';
			var loader: uif_loader = new uif_loader(this, 'http://start.fotostrana.ru/vkontakte/part_dating/fotostrana_partners_600x120.swf' + params);
			loader.mask = se_util.createComponent(this, uif_ecomponent, 'white'); 
		}
	}
}